﻿@model WeddingEventManagementApp.Models.LocationMain_VM
@{
    ViewBag.Title = "Locations";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="twelve column">
    <div class="row">
        <div class="twelve column">
        <h4 class="left">Locations</h4>
        @Html.ActionLink("New Location", "Create", "Location", null, new { @class = "button success right" })
        </div>
    </div>
    <div class="row">
        <div class="twelve column">
            <div id="filters" class="filter-nav">
                <ul id="locationFilter" class="no-bullet alphabet clearfix">
                    <li style="width: auto; margin-right: 5px;">
                        <a href="#all" class="label" data-filter="*">Show All</a> | 
                    </li>
                    <li>
                        <a href="#religious" data-filter="Religious">Religious</a>   
                    </li>
                    <li>
                        <a href="#hall" data-filter="Hall">Hall</a>
                    </li>
                    <li>
                        <a href="#hall" data-filter="Hotel">Hotel</a>
                    </li>
                    <li>
                        <a href="#club" data-filter="Country Club">Country Club</a>
                    </li>
                    <li>
                        <a href="#personal" data-filter="Historical">Historical</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>

<div class="twelve column">
    <div id="map_canvas" style="width:100%; height:350px; background: white;border: 15px solid #fff;box-shadow: 0 0 20px #999;border-radius: 2px;"></div>
</div>

<div class="twelve column">
<div class="row">
        <div class="six column">
            <h5>Most Used</h5>
            <ul class="client-list no-bullet panel">
                @foreach(LocationOccurrence l in Model.MostUsed)
                {
                    <li class="top-5" data-address="@l.Location.StreetAddress, @l.Location.City, @l.Location.Province, @l.Location.PostalCode">
                        @Html.ActionLink(l.Location.Name, "Details", new { id=l.Location.LocationID })
                    </li>
                    <li><abbr class="timeago">Uses: @l.OccuranceNum</abbr></li>
                }
            </ul>
        </div>
        <div class="six column">
            <h5>Recently Viewed</h5>
            <ul class="client-list no-bullet panel">
                @foreach(Location l in Model.RecentlyViewed)
                {
                    <li class="recent-5" data-address="@l.StreetAddress, @l.City, @l.Province, @l.PostalCode">@Html.ActionLink(l.Name, "Details", new { id=l.LocationID })</li>
                    <li><abbr class="timeago">@l.LastViewed</abbr></li>
                }
            </ul>
        </div>
    </div>
</div>
@section scripts {
    <script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=true"></script>
    <script src="~/Scripts/gmaps.js"></script>
    <script src="~/Scripts/location.js"></script>
}